Integrand size = 32, antiderivative size = 62 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=-\frac {(i A-B) x}{2 a}+\frac {A \log (\sin (c+d x))}{a d}+\frac {A+i B}{2 d (a+i a \tan (c+d x))} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {3677, 3612, 3556} \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {A+i B}{2 d (a+i a \tan (c+d x))}-\frac {x (-B+i A)}{2 a}+\frac {A \log (\sin (c+d x))}{a d} \]
[In]
[Out]
Rule 3556
Rule 3612
Rule 3677
Rubi steps \begin{align*} \text {integral}& = \frac {A+i B}{2 d (a+i a \tan (c+d x))}+\frac {\int \cot (c+d x) (2 a A-a (i A-B) \tan (c+d x)) \, dx}{2 a^2} \\ & = -\frac {(i A-B) x}{2 a}+\frac {A+i B}{2 d (a+i a \tan (c+d x))}+\frac {A \int \cot (c+d x) \, dx}{a} \\ & = -\frac {(i A-B) x}{2 a}+\frac {A \log (\sin (c+d x))}{a d}+\frac {A+i B}{2 d (a+i a \tan (c+d x))} \\ \end{align*}
Time = 0.82 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.39 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=-\frac {(3 A+i B) \log (i-\tan (c+d x))-4 A \log (\tan (c+d x))+(A-i B) \log (i+\tan (c+d x))+\frac {2 i (A+i B)}{-i+\tan (c+d x)}}{4 a d} \]
[In]
[Out]
Time = 0.14 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.37
method | result | size |
risch | \(\frac {x B}{2 a}-\frac {3 i x A}{2 a}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} B}{4 a d}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} A}{4 a d}-\frac {2 i A c}{a d}+\frac {A \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}\) | \(85\) |
derivativedivides | \(-\frac {A \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d a}-\frac {i A \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}+\frac {B \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}-\frac {i A}{2 d a \left (\tan \left (d x +c \right )-i\right )}+\frac {B}{2 d a \left (\tan \left (d x +c \right )-i\right )}+\frac {A \ln \left (\tan \left (d x +c \right )\right )}{a d}\) | \(111\) |
default | \(-\frac {A \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d a}-\frac {i A \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}+\frac {B \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}-\frac {i A}{2 d a \left (\tan \left (d x +c \right )-i\right )}+\frac {B}{2 d a \left (\tan \left (d x +c \right )-i\right )}+\frac {A \ln \left (\tan \left (d x +c \right )\right )}{a d}\) | \(111\) |
norman | \(\frac {\frac {i B +A}{2 a d}+\frac {\left (-i A +B \right ) x}{2 a}+\frac {\left (-i A +B \right ) \tan \left (d x +c \right )}{2 a d}+\frac {\left (-i A +B \right ) x \left (\tan ^{2}\left (d x +c \right )\right )}{2 a}}{1+\tan ^{2}\left (d x +c \right )}+\frac {A \ln \left (\tan \left (d x +c \right )\right )}{a d}-\frac {A \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d a}\) | \(117\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.10 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=-\frac {{\left (2 \, {\left (3 i \, A - B\right )} d x e^{\left (2 i \, d x + 2 i \, c\right )} - 4 \, A e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right ) - A - i \, B\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.87 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {A \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{a d} + \begin {cases} \frac {\left (A + i B\right ) e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text {for}\: a d e^{2 i c} \neq 0 \\x \left (- \frac {- 3 i A + B}{2 a} + \frac {\left (- 3 i A e^{2 i c} - i A + B e^{2 i c} + B\right ) e^{- 2 i c}}{2 a}\right ) & \text {otherwise} \end {cases} + \frac {x \left (- 3 i A + B\right )}{2 a} \]
[In]
[Out]
Exception generated. \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.43 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.56 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=-\frac {\frac {{\left (A - i \, B\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{a} + \frac {{\left (3 \, A + i \, B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{a} - \frac {4 \, A \log \left (\tan \left (d x + c\right )\right )}{a} - \frac {3 \, A \tan \left (d x + c\right ) + i \, B \tan \left (d x + c\right ) - 5 i \, A + 3 \, B}{a {\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \]
[In]
[Out]
Time = 7.98 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.58 \[ \int \frac {\cot (c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {\frac {A}{2\,a}+\frac {B\,1{}\mathrm {i}}{2\,a}}{d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}+\frac {A\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{a\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,a\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (3\,A+B\,1{}\mathrm {i}\right )}{4\,a\,d} \]
[In]
[Out]